package com.iss.okair.controller.baseinfo;

import com.iss.okair.db.entity.AssetsFinance;
import com.iss.okair.db.entity.Category;
import com.iss.okair.db.entity.Sysdictvalue;
import com.iss.okair.db.entity.SysdictvalueType;
import com.iss.okair.service.baseinfo.SysdictvalueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("logic/baseInfo/sysDict")
public class SysdictvalueController {

    @Autowired
    private SysdictvalueService service;

    @RequestMapping("/typeList")
    public List<SysdictvalueType> getdictList(){
        return service.getdictList();
    }

    @RequestMapping("/find")
    public List<Sysdictvalue> find(Sysdictvalue example){
        return service.findByExample(example);
    }
    @RequestMapping("/{typecode}")
    public List<Sysdictvalue> ListByParentId(@PathVariable String typecode){
        return service.findByTypeCode(typecode);
    }
}
